Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mingw friendly case for includes. #248

Merged
merged 1 commit into from
Jan 30, 2025
Merged

Mingw friendly case for includes. #248

merged 1 commit into from
Jan 30, 2025

Conversation

mefyl
Copy link
Contributor

@mefyl mefyl commented Oct 10, 2024

Since windows filesystem is case insensitive and, AFAIK, windows.h is always lowercase in MinGW distributions, using a lowercase include will work on both transparently.

Currently:

mc_getrandom_stubs.c:60:10: fatal error: Windows.h: No such file or directory
   60 | #include <Windows.h>
      |          ^~~~~~~~~~~

@hannesm
Copy link
Member

hannesm commented Oct 11, 2024

Thanks for your PR. By chance, would you be able to add a GitHub action (or another CI) that tests the "mingw" case?

@mefyl
Copy link
Contributor Author

mefyl commented Oct 14, 2024

I'm not really familiar with Github actions; is there already a CI environment cross compiling with mingw ?

@hannesm
Copy link
Member

hannesm commented Oct 14, 2024

I'm not really familiar with Github actions; is there already a CI environment cross compiling with mingw ?

I don't know. Maybe ask the people who're into "windows" and "OCaml" - they must have some secret runes how to test their projects in CI / GitHub actions.

@hannesm hannesm merged commit dae4765 into mirage:main Jan 30, 2025
9 of 13 checks passed
@hannesm
Copy link
Member

hannesm commented Jan 30, 2025

Thanks.

hannesm added a commit to hannesm/opam-repository that referenced this pull request Jan 30, 2025
CHANGES:

Provide thread safety (Unix.fork and multi-domain safe) RNG generators by using
getrandom/getentropy on UNIX (or /dev/urandom). In your UNIX applications,
please use the "mirage-crypto-rng.unix" dependency and call
"Mirage_crypto_rng_unix.use_default ()" (instead of depending on
mirage-crypto-rng-{lwt,eio,async} and calling
"Mirage_crypto_rng_{eio,lwt,async}.initialize".

* mirage-crypto-rng: handle CPU_RNG failures (mirage/mirage-crypto#255 @hannesm, addresses mirage/mirage-crypto#251 mirage/mirage-crypto#252
  mirage/mirage-crypto#253)
* mirage-crypto-rng.unix: provide two generators: Urandom and Getentropy
  (mirage/mirage-crypto#250 @hannesm @reynir @edwintorok, addresses mirage/mirage-crypto#249)
* mirage-crypto-rng: deprecate the initialize for lwt, async, eio (and
  advertise `Mirage_crypto_rng_unix.use_default ()` (mirage/mirage-crypto#254 @hannesm)
* mirage-crypto-rng-eio: declare the cstruct dependency (mirage/mirage-crypto#247 @hannesm)
* include "windows.h" (all lowercase) (mirage/mirage-crypto#248 @mefyl)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants